import { Grid } from '@material-ui/core';
import React from 'react'
import BlogCard from './blogCard'

function BlogList(props) {
  const cards = props.blogs.map((blog) => {
    return (
      <Grid item xs={6} sm={4}
        key={blog.id}
      >
        <BlogCard
          {...blog}
        />
      </Grid>
    )
  });
  return (
    <Grid container spacing={3}>
      {cards}
    </Grid>
  )
}

export default BlogList;